package com.example.yyang.demo.adapter

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter

class MainPagerAdapter(fragmentManager: FragmentManager?, private val fragments : List<Fragment>) : FragmentPagerAdapter(fragmentManager) {
    override fun getCount(): Int {
        return fragments.size
    }

    override fun getItem(p0: Int): Fragment {
        return fragments.get(p0)
    }

}